<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>奇思妙想</title>
</head>
<body>

    <!-- 

        ul是li的parentNode




     -->
    <ul id="ul">
        <li>北京</li>
        <li>上海</li>
        <li>杭州</li>
        <li id="nj">南京</li>
    </ul>

    <button id="btn">点击</button>
    <script>
        let ul =document.getElementById("ul");
        let btn =document.getElementById("btn");
        let nj =document.getElementById("nj");

        btn.onclick =function(){
            ul.removeChild(nj);
        }

        console.log( ul === nj.parentNode);






    </script>
</body>
</html>